package com.bridgeintelligent.tag.webserver.dim.query.service;

import com.bridgeintelligent.tag.webserver.dim.query.api.*;
import feign.Body;
import feign.Headers;
import feign.Param;
import feign.RequestLine;

/**
 * Created by JackCheung on 2019/10/21 5:53 PM.
 */
public interface QueryApi {

    @RequestLine("POST /dataSet")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("config={config}")
    DataSetRsp dataSet(@Param("config") CharSequence config);

    @RequestLine("POST /customerGroup")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("config={config}")
    CustomerGroupRsp customerGroup(@Param("config") CharSequence config);

    @RequestLine("POST /microPortrait")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("filterName={filterName}&filterValue={filterValue}")
    MicroPortraitRsp microPortraitRsp(@Param("filterName") CharSequence filterName, @Param("filterValue") CharSequence filterValue);


    @RequestLine("POST /index")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("config={config}")
    IndexRsp index(@Param("config") CharSequence config);


    @RequestLine("POST /customersAnalysis")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    DimAnalysisRsp customersAnalysis(@Param("condition") CharSequence condition);


    @RequestLine("POST /customersMultiAnalysis")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    MultiDimAnalysisRsp customersMultiAnalysis(@Param("condition") CharSequence condition);

    @RequestLine("POST /customerDetail")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    CustomerDetailRsp customerDetail(@Param("condition") CharSequence condition);

    @RequestLine("POST /customersDimAggregation")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    DimAggregationRsp customersDimAggregation(@Param("condition") CharSequence condition);

    @RequestLine("POST /custQuery")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("config={config}")
    CustQuerySetRsp custQuery(@Param("config") CharSequence config);

    @RequestLine("POST /analysisAggregation")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    AnalysisAggregationRsp analysisAggregation(@Param("condition") CharSequence condition);

    @RequestLine("POST /analysisCount")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    AnalysisAggregationRsp analysisCount(@Param("condition") CharSequence condition);

    @RequestLine("GET /utils/refresh")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    CommonRsp refresh();

    @RequestLine("POST /lookLikeAggeragtion")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    LookLikeResult lookLikeAggeragtion(@Param("condition") CharSequence condition);

    @RequestLine("POST /lookLikeMinMax")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    LookLikeResult lookLikeMinMax(@Param("condition") CharSequence condition);

    @RequestLine("POST /themeDetail")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    ThemeDetailResult themeDetail(@Param("condition") CharSequence condition);

    @RequestLine("POST /themeCount")
    @Headers("Content-Type: application/x-www-form-urlencoded")
    @Body("condition={condition}")
    ThemeDetailResult themeCount(@Param("condition") CharSequence condition);


}
